Skip to content

Document contextual endpoint resolution APIs for Aspire 13.2#374

Open
Copilot wants to merge 39 commits intorelease/13.2from
copilot/document-endpoint-resolution-apis
Open

Document contextual endpoint resolution APIs for Aspire 13.2#374
Copilot wants to merge 39 commits intorelease/13.2from
copilot/document-endpoint-resolution-apis

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

Aspire 13.2 fixes endpoint resolution to be context-aware. The same resource now correctly resolves to different URLs depending on the caller's network context (localhost:1234 vs host.docker.internal:1234 vs cache:6379).

Changes

What's New article (aspire-13-2.mdx):

  • Added "Contextual endpoint resolution" section under App model updates
  • Documented ValueProviderContext.Caller for resource-perspective resolution
  • Documented ValueProviderContext.Network for network-perspective resolution
  • Listed KnownNetworkIdentifiers (LocalhostNetwork, DefaultAspireContainerNetwork, PublicInternet)
  • Noted APIs existed in 13.1 but didn't behave correctly until 13.2
  • Linked to GitHub issues #7153 and PR #14278, plus architecture docs

Architecture documentation (resource-hierarchies.mdx):

  • Expanded "Context-based endpoint resolution" section with detailed API reference
  • Added subsection "Explicit context resolution with ValueProviderContext"
  • Documented both Caller and Network resolution patterns with complete examples
  • Updated cross-context communication example to show new 13.2 simplified approach
  • Included before/after comparison showing old manual URL construction vs new API
  • Added cross-reference link back to what's new article

Example

var redis = builder.AddRedis("cache");
var endpoint = redis.GetEndpoint("tcp");

// Resolve from a specific resource's perspective
var url = await endpoint.GetValueAsync(new ValueProviderContext {
    Caller = containerApp.Resource,  // Returns "cache:6379" for container-to-container
});

// Or resolve from a specific network context
var url = await endpoint.GetValueAsync(new ValueProviderContext {
    Network = KnownNetworkIdentifiers.DefaultAspireContainerNetwork
});
Original prompt

This section details on the original issue you should resolve

<issue_title>[13.2] Document new contextual endpoint resolution apis.</issue_title>
<issue_description>You can now resolve endpoints from the perspective of specific resources. Depending on your ocnext, the same resource could be http://host.docker.internal:1234, http://localhost:1234 or http://resource.dev.internal:4567 depending on where you resolved it from.

var endpoint = redis.GetEndpoint("tcp")
var url = await endpoint.GetValueAsync(new ValueProviderContext {
    Caller = containerApp.Resource,
});

You can also resolve the url from the perspective of a specific network:

var endpoint = redis.GetEndpoint("tcp")
var url = await endpoint.GetValueAsync(new ValueProviderContext {
    Network = KnownNetworkIdentifiers.DefaultAspireContainerNetwork
});

(Note, the APIs for this all existed in 13.1, they just didn't behave as you'd expect them to)

References:

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 30 commits February 3, 2026 09:45
* Initial plan

* Add WithBun() documentation to JavaScript integration page

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

* Update Bun example to use specific version tag

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
)

* Initial plan

* Add documentation for deployment slot support to Azure App Service

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
- Created documentation for Azure Application Insights integration.
- Created documentation for Azure Data Explorer (Kusto) integration.
- Created documentation for Azure Log Analytics integration.
- Created documentation for Azure Data Lake Storage integration.
- Added `aspire doctor` command placeholder with redirect to main CLI command page.
- Added documentation for `aspire ps` command to list running AppHost processes.
- Added documentation for `aspire stop` command to stop running AppHost processes.
…#288)

* Initial plan

* Update ASPIRE008 diagnostic page for GenerateAssemblyInfo requirement

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

* Update project file samples to modern 13.x format

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
#277)

* Add polyglot AppHost documentation for TypeScript, Python, Go, Rust, and Java

* feat: enhance PivotSelector component with marginTop prop for better layout control (#302)

docs: update Polyglot AppHost documentation with new features and usage examples

docs: add link to Polyglot AppHost in resource model documentation

docs: include Polyglot AppHost reference in get-started guide for broader language support

style: import utility classes for padding and margin in site CSS

style: create utils.css for reusable padding and margin utility classes

* fix: format project structure in polyglot AppHost documentation for clarity

---------

Co-authored-by: David Pine <david.pine@microsoft.com>
- Created a new translation guide document in MDX format to assist contributors in translating the aspire.dev documentation.
- Added two new images for the translation page link and language selector in both light and dark themes.
- Included a detailed section on supported languages, translation status, best practices, and tips for translators.
- Added FooterPreferences component for user preferences (theme, language, keyboard shortcuts).
- Introduced FooterSocials component to display social media links.
- Updated Footer.astro to include new components and adjusted layout for preferences.
- Enhanced Header.astro to remove theme and language selectors, now located in the footer.
- Implemented auto-detection of user language on first visit in Head.astro.
- Adjusted styles for new components and improved responsiveness.
- Updated translations in various languages to include "preferences".
- Changed hideOnClick prop in Head.astro from 'toggle' to true for improved clarity.
- Removed fixed width and height from .starlight-sidebar-topics-icon to allow for flexible sizing.
- Adjusted icon size in .social-icons and .starlight-sidebar-topics-icon for consistency and better responsiveness.
* Initial plan

* Add documentation for .NET tool resources

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
…ASPIREEXTENSION001 with version notes and suppression methods
…ASPIRECONTAINERSHELLEXECUTION001, ASPIREPIPELINES004, ASPIREPOSTGRES001, and ASPIREUSERSECRETS001 with improved descriptions and examples
IEvangelist and others added 7 commits February 3, 2026 09:45
* Clarify Azure AI Foundry format parameter documentation (#313)

* Initial plan

* Improve Azure AI Foundry format parameter documentation

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

* Configure WAF on the Azure Front Door (#324)

* Configure WAF on the Azure Front Door

These policies are required by Microsoft to prevent DDOS attacks on the site.

* Fix invalid wafPolicy name

* Update resource creation in Node.js docs (#333)

Correction to invalid syntax.

* Add generic "Upgrade Aspire" article under What's new (#322)

* Initial plan

* Add Upgrade Aspire article and update sidebar configuration

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

* Fix typo and remove broken link in Upgrade Aspire article

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

* refactor: streamline Upgrade Aspire article and remove legacy content

* fix: update Upgrade Aspire article for clarity and accuracy

* chore: remove outdated setup and tooling link from Upgrade Aspire article

* fix: update link to installation instructions for Aspire CLI in Upgrade Aspire article

* fix: clarify upgrade instructions and remove outdated content in Upgrade Aspire article

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: David Pine <david.pine@microsoft.com>

* Add CLI telemetry details page

* Fix

* Fix

* Fix

* Improve doc-tester and doc-writer skills, fix cross-platform paths (#361)

* Add doc-writer and doc-tester skills with hex1b MCP server

- Add doc-writer skill with Aspire documentation guidelines
- Add doc-tester skill for validating documentation accuracy
- Include common documentation rules from PR feedback patterns
- Configure hex1b MCP server in .mcp.json, .vscode/mcp.json, opencode.jsonc
- Add .doc-tester-workspace/ to .gitignore
- Add .vscode/mcp.json exception to .gitignore

* Improve doc-tester and doc-writer skills, fix cross-platform paths

Key changes:

doc-tester skill:
- Add Knowledge Source Awareness section to distinguish between intrinsic knowledge and documentation-derived knowledge
- Add Documentation Takes Priority guidance - follow the docs being tested, not skill defaults
- Add Aspire CLI installation guidance (GA, Dev, PR, and Staging builds)
- Replace dotnet-specific commands with polyglot-friendly Aspire CLI (aspire add, aspire run)
- Add Hex1b MCP tools section for terminal screenshots and asciinema recordings

doc-writer skill:
- Add AsciinemaPlayer component documentation for terminal recordings
- Add Hex1b MCP tools guidance for creating new recordings
- Add Aspire CLI installation guidance for testing documentation
- Add aspire add recommendation for testing integration packages

Other fixes:
- Update Prettier extension recommendation to esbenp.prettier-vscode
- Fix cross-platform path in frontend.esproj (backslash to forward slash)

* Update Hex1b.McpServer to 0.66.0

---------

Co-authored-by: Mitch Denny <mitch@mitchdeny.com>

* Fix PowerShell syntax in telemetry opt-out example

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Tristan <Tri125@users.noreply.github.com>
Co-authored-by: David Pine <david.pine@microsoft.com>
Co-authored-by: Mitch Denny <midenn@microsoft.com>
Co-authored-by: Mitch Denny <mitch@mitchdeny.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot AI changed the title [WIP] Document new contextual endpoint resolution APIs Document contextual endpoint resolution APIs for Aspire 13.2 Feb 5, 2026
Copilot AI requested a review from IEvangelist February 5, 2026 14:17
@IEvangelist IEvangelist marked this pull request as ready for review February 5, 2026 15:00
@IEvangelist
Copy link
Member

Hey @copilot, while this is great that you added this content to the What's new in 13.2 article - we might want to have a look around in other existing content and find additional places to 1. link to from the what's new, and then 2. provide this info in places that a user might not otherwise find. For example, does this need a standalone article? I'm not sure, but have a look...

- Added ValueProviderContext API documentation with Caller and Network examples
- Updated existing cross-context example to show new 13.2 APIs
- Added comparison showing old manual URL construction vs new API
- Added cross-reference link between what's new and architecture docs

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 5, 2026

Hey @copilot, while this is great that you added this content to the What's new in 13.2 article - we might want to have a look around in other existing content and find additional places to 1. link to...

I've expanded the documentation to include detailed API reference in the architecture section. The changes include:

Architecture documentation (resource-hierarchies.mdx):

  • Expanded the existing "Context-based endpoint resolution" section with detailed ValueProviderContext API documentation
  • Added examples for both Caller and Network resolution patterns
  • Updated the cross-context communication example to show the new 13.2 approach
  • Included a before/after comparison showing the old manual URL construction vs the new API
  • Added cross-reference links between the what's new article and the architecture docs

This provides users with:

  1. A high-level overview in "What's new" for discoverability
  2. Detailed API reference in the architecture docs where users working with endpoints will find it
  3. Before/after examples to help users migrate from the old workaround

Commit: 8b14b75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants